<?php

class Model {

    function __construct() {
        $this->database = new Database();
        UserAccess::initDatabase($this->database);
        UserAccess::checkLoggedin();
    }

    /**
     * Set Login panel closed if there is no Session-msg. otherwise panel starts opened. 
     */
    function LoginPanalStartscript() {
        if ($_SESSION['msg'])
        {
            echo '<script type="text/javascript"> $(function(){$("div#panel").show(); $("#toggle a").toggle(); }); </script>';
        }
    }
}